﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="ClientDetail.aspx.cs" Inherits="Client_ClientDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        客户资料</h2>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ClientID" DataSourceID="SqlDataSource1"
        OnDataBound="FormView1_DataBound">
        <EditItemTemplate>
        </EditItemTemplate>
        <InsertItemTemplate>
        </InsertItemTemplate>
        <ItemTemplate>
            <table class="commoninfo">
                <tr>
                    <td style="width:100px">
                        客户名
                    </td>
                    <td>
                        <asp:Label ID="ClientNameLabel" runat="server" Text='<%#Bind("ClientName")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        联系电话
                    </td>
                    <td>
                        <asp:Label ID="TelephoneLabel" runat="server" Text='<%#Bind("Telephone")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        手机
                    </td>
                    <td>
                        <asp:Label ID="MobileLabel" runat="server" Text='<%#Bind("Mobile")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        地址
                    </td>
                    <td>
                        <asp:Label ID="AddressLabel" runat="server" Text='<%#Bind("Address")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        电子邮件
                    </td>
                    <td>
                        <asp:Label ID="EmailLabel" runat="server" Text='<%#Bind("Email")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        QQ或MSN
                    </td>
                    <td>
                        <asp:Label ID="IMLabel" runat="server" Text='<%#Bind("IM")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        传真
                    </td>
                    <td>
                        <asp:Label ID="FAXLabel" runat="server" Text='<%#Bind("FAX")%>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        客户类型
                    </td>
                    <td>
                        <asp:Label ID="typeLabel" runat="server" Text='<%#Bind("type")%>' />
                    </td>
                </tr>
                <%--<tr>
                    <td>
                        ClientID
                    </td>
                    <td>
                        <asp:Label ID="ClientIDLabel" runat="server" Text='<%#Eval("ClientID")%>' />
                    </td>
                </tr>--%>
            </table>
        </ItemTemplate>
    </asp:FormView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:KOONCRMDB %>"
        SelectCommand="SELECT ClientName,Telephone, Mobile, Address, Email, IM, CASE Type WHEN 1 THEN '客户' WHEN 2 THEN '中介' END AS type, FAX,ClientID FROM Client where ClientID=@ClientID">
        <SelectParameters>
            <asp:QueryStringParameter Name="ClientID" QueryStringField="ID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
